#!/bin/bash
yes(){
    if test "$1" = "add"
then
apt-get -y install ${@:2}
elif test "$1" = "update"
then
apt-get -y update
elif test "$1" = "del"
then
apt-get -y purge ${@:2}

elif test "$1" = "upgrade"
then
apt-get -y upgrade
else
echo E: Invalid operation $1
fi
}
if test "$1" = "-i"
then
yes $2 ${@:3}

exit
fi

if test "$1" = "add"
then
apt-get install ${@:2}
elif test "$1" = "update"
then
apt-get update
elif test "$1" = "del"
then
apt-get purge ${@:2}
elif test "$1" = "search"
then
apt-cache search $2
elif test "$1" = "upgrade"
then
apt-get upgrade
else
echo E: Invalid operation $1
fi

